You compose a predefined set by using the backslash character together with an alphabetical character. Lowercase letters indicate inclusive sets, character classes composed of the characters having a special feature; capital letters denote the negated class of their corresponding lowercase set, composed of all the characters not having that special feature.
- \d Numeric digit. Equivalent to [0-9].
- \D Anything but numeric digit. Equivalent to [^0-9].
- \w Alphanumerical character, including the underscore: [a-zA-Z0-9_].
- \W Non-alphanumerical character, nor the underscore: [^a-zA-Z0-9_].
- \l Lowercase letter. It also includes the accented characters as defined by the current language selection.
- \L Not a lowercase letter.
- \u Uppercase letter. It also includes the accented characters as defined by the current language selection.
- \U Not an uppercase letter.
- \s White-space, like space, tabs, newlines, etc.
- \S A non-spacing character.
Predefined character sets represented by lowercase characters can be included within user-defined sets. For example '[\da-fA-F]' describes hexadecimal characters. Of course, you cannot define a range with either end being a predefined set.